#ifndef _PREDICATE_H
#define _PREDICATE_H
#include "common.h"

/**
 * Builder of NOT predicate.
 */
predicate *not_predicate(predicate *p1);

/**
 * Builder of AND test.
 */
predicate *and_predicate(predicate *p1, predicate *p2);

/**
 * Builder of OR test.
 */
predicate *or_predicate(predicate *p1, predicate *p2);

/**
 * Builder of name predicate.
 */
predicate *name_predicate(char *name);

/**
 * The type predicate builder.
 */
predicate *type_predicate(unsigned int type);

/**
 * Builder of uid_predicate.
 */
predicate *uid_predicate(uid_t uid);

/**
 * Builder of all true predicate
 */
predicate *true_predicate();

/**
 * Builder of amctime predicate.
 * parameter field:
 *   0 - access time
 *   1 - modify time
 *   2 - change time
 */
predicate *amctime_predicate(int days_ago, enum AMC_FIELDS field);

#endif
